
from rest_framework.viewsets import ModelViewSet

from .serializers import UserInfoSerializer, AddrSerializer
from .models import UserInfo, Addr

# 用户信息增删查改


class UserView(ModelViewSet):

    # 模型类指定
    queryset = UserInfo.objects.all()
    # 序列化器指定
    serializer_class = UserInfoSerializer


# 收货地址增删查改


class AddrView(ModelViewSet):
    # 模型类指定
    queryset = Addr.objects.all()
    # 序列化器指定
    serializer_class = AddrSerializer



